package com.liqw.crawler.convert;

import com.liqw.crawler.request.HouseReq;
import com.liqw.crawler.response.HouseRsp;
import com.liqw.crawler.model.House;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;

@Mapper(componentModel = "spring", imports = { LocalDateTime.class, Date.class, ZoneId.class })
public interface HouseConvert {
    HouseConvert INSTANCE = Mappers.getMapper(HouseConvert.class);

    HouseRsp toRsp(House house);

    House toEntity(HouseReq houseReq);
}